﻿
namespace GiveAQuiz.Web.Authentication
{
  /// <summary>
  /// An interface wrapper around Forms Authentication.  The interface
  /// makes the application more testable since the FormsAuthentication
  /// class itself contains static methods.  Wrapping an interface around 
  /// it decouples the calling code and provides for easy mocking.
  /// </summary>
  public interface IFormsAuthentication
  {
    /// <summary>
    /// Sign in to the application using forms authentication.
    /// </summary>
    /// <param name="userName">The user name.</param>
    /// <param name="createPersistentCookie">Remember me? option on 
    /// a web application.</param>
    void SignIn(string userName, bool createPersistentCookie);

    /// <summary>
    /// Sign out of the application using forms authentication.
    /// </summary>
    void SignOut();
  }
}
